package org.example.myleet.p628;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution2 solution = new Solution2();
        Assert.isTrue(6 == solution.maximumProduct(new int[]{1,2,3}));
        Assert.isTrue(24 == solution.maximumProduct(new int[]{1,2,3,4}));
        Assert.isTrue(48 == solution.maximumProduct(new int[]{1,4,2,3,4}));
        Assert.isTrue( 99800100 == solution.maximumProduct(new int[]{999,1,100,3,2,-999,-100,-3,-2,-1,0}));
        Assert.isTrue( 99800100 == solution.maximumProduct(new int[]{999,-999,-100,-3,-2,-1,0}));
        Assert.isTrue( 299700 == solution.maximumProduct(new int[]{999,1,100,3,2,-999}));
        Assert.isTrue( 998001 == solution.maximumProduct(new int[]{999,1,100,3,2,-999,-1}));
        Assert.isTrue( 0 == solution.maximumProduct(new int[]{-999,-100,-3,-2,-1,0}));
        Assert.isTrue( -6 == solution.maximumProduct(new int[]{-1,-2,-3,-4}));
    }
}
